#include<stdio.h>
#include<sys/types.h>
#include<sys/wait.h>

int main()
{
  pid_t id = fork();
  if(id == 0)
  {
    int count = 5;
    while(count)
    {
      printf("我是子进程，剩余运行时间:%d pid:%d ppid:%d\n", count--, getpid(), getppid());
      sleep(1);
    }
  }

  printf("我是父进程 ret:%d pid:%d ppid:%d\n", ret, getpid(), getpid());


  return 123;
}
